#ifndef DIALOGUSER_H
#define DIALOGUSER_H

#include <QDialog>

#include "SecureDataStore.h"
#include "SharedPtr.h"
#include <QButtonGroup>


namespace Ui {
class DialogUser;
}

class DialogUser : public QDialog
{
    Q_OBJECT

public:
    explicit DialogUser(QWidget *parent = 0);
    ~DialogUser();

	void setDataStore(std::shared_ptr< SecureDataStore>& dataStore);

    void setUser(const QString& user);

private slots:

    void on_pushButtonOK_clicked();

    void on_pushButtonCancel_clicked();

    void on_pushButtonReset_clicked();

private:
	bool checkAccount(const QString& name, const QString& password);

private:
    Ui::DialogUser *ui;

private:
	std::shared_ptr< SecureDataStore> m_dataStore;
    QString m_user;

};

#endif // DIALOGUSER_H
